package com.wm.config;

import com.wm.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * @ClassName: MainConfig3
 * @Description: TODO
 * @Author: WM
 * @Date: 2022/9/28 15:09
 */
@Configuration
public class MainConfig3 {

    @Scope("thread")
    @Bean("person")
    public Person person() {
        System.out.println("给容器添加person对象");
        return new Person("wm", 28);
    }
}
